<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="css/mui.min.css" />
		<link rel="stylesheet" href="css/wechat-tixian.css" />
		<link rel="stylesheet" href="css/toast.css" />
		<script src="js/toast.js"></script>
        <script src="js/jquery-3.3.1.min.js"></script>
         <script src="js/config.js"></script>
		<title>微信提现</title>
	</head>
	<body>
	<!--<header class="mui-bar mui-bar-nav">-->
		<!--<h3 class="mui-title">大钞市·微信提现</h3>-->
	<!--</header>-->

		
		<div class="top">
			<!--<a href="./tixianway.html" class="back mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>-->

			<div>
					<h4>微信提现</h4>
				</div>
		</div>
		
		
		<div class="content">
			<div class="msg">
					<div class="box">
						<div class="font">请输入您的真实姓名</div>
						
							<input id="name" type="text" placeholder="输入真实姓名" />
						
					</div>
					
					<div class="box1">
						<div class="font">请输入您的微信号</div>
						
							<input id="num" type="number" placeholder="输入微信号/手机号" />
						
					</div>
			</div>
			
			<div class="choice">
				<div class="top1">
					<div class="money">
						<div>
							提现<span>10</span>元
						</div>
					</div>
				
					<div class="money">
						<div>
							提现<span>30</span>元
						</div>
					</div>
				</div>
				
				<div class="down">
					<div class="money">
						<div>
							提现<span>50</span>元
						</div>
					</div>
					
					<div class="money">
						<div>
							提现<span>100</span>元
						</div>
					</div>
				</div>
				
			</div>
			
		<button class="submit">提现</button>
			
		</div>
		
		<script>
			var len = $(".money").length;
			
			for(let i = 0;i < len;i++){
				$(".money").eq(i).click(function(){
					$(".money").not(i).removeClass("action")
					$(".money").eq(i).toggleClass("action")
				})
			}
			
			//点击提现按钮
			
			$(".submit").eq(0).click(function(){
				if($("#name").val().length == 0){
                    toast("请输入您的姓名",500);
					return
				};
				
				
				
				if($("#num").val().length == 0){
                    toast("请输入您的微信号",500);
					return
				};
				
				
				
				if($(".action").length == 0){
                    toast("请选择提现金额",500);
					return
				}
				
		
			
			var price = $(".action:eq(0) span").text();
			var name = $("#name").val();
			var num = $("#num").val();
			
			console.log(price +":"+name+":"+num)
				//点击体现
				$.ajax({
							url:host+"/buss/tixian/save",
							type:"post",
							data:'name='+name+'&weixn='+num+'&pirce='+price
						,
							success:function(res){
								console.log(JSON.stringify(res));
								if(res.success){
                                    toast("您的提现申请已提交",500);
								}else{
                                    toast(res.msg,500);
								}
								
							},
							error:function(e){
								console.log(e.status+":"+e.statusText)
							}
					
					
				})
			})
			
			
			
		</script>
	</body>
</html>
